//导航下拉菜单
$("#b2").hover(function() {
	$("#menu").css("display", "block");
}, function() {
	$("#menu").css("display", "none");
});
$("#menu").hover(function() {
	$("#menu").css("display", "block");
}, function() {
	$("#menu").css("display", "none");
});
//二维码
$("#weixin").hover(function() {
	$("#code").css("display", "block");
}, function() {
	$("#code").css("display", "none");
});
$("#pic1").on("click", function() {
	window.open("http://www.subway.com.cn/images/uploadImg/2016040117224114977a.png");
});
$("#pic2").on("click", function() {
	window.open("http://www.subway.com.cn/images/uploadImg/201612191444322d3b38.jpg");
});
//菜单下拉收起
$("#click1").click(function() {
	if($("#food1").css("display") == "none") {
		$("#food1").css("display", "block");
		$("#code").css("top", "465px");
		$("#click1 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>");
	} else {
		$("#food1").css("display", "none");
		$("#code").css("top", "370px");
		$("#click1 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>");
	}
	$("#food2").css("display", "none");
	$("#food3").css("display", "none");
	$("#food4").css("display", "none");
	$("#food5").css("display", "none");
	$("#food6").css("display", "none");

});
$("#click2").click(function() {
	if($("#food2").css("display") == "block") {
		$("#food2").css("display", "none");
		$("#code").css("top", "370px");
		$("#click2 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>")
	} else {
		$("#food2").css("display", "block");
		$("#code").css("top", "485px");
		$("#click2 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>")
	}
	$("#food1").css("display", "none");
	$("#food3").css("display", "none");
	$("#food4").css("display", "none");
	$("#food5").css("display", "none");
	$("#food6").css("display", "none");

});
$("#click3").click(function() {
	if($("#food3").css("display") == "block") {
		$("#food3").css("display", "none");
		$("#code").css("top", "370px");
		$("#click3 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>")
	} else {
		$("#food3").css("display", "block");
		$("#code").css("top", "490px");
		$("#click3 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>")
	}
	$("#food2").css("display", "none");
	$("#food1").css("display", "none");
	$("#food4").css("display", "none");
	$("#food5").css("display", "none");
	$("#food6").css("display", "none");

});
$("#click4").click(function() {
	if($("#food4").css("display") == "block") {
		$("#food4").css("display", "none");
		$("#code").css("top", "370px");
		$("#click4 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>")
	} else {
		$("#food4").css("display", "block");
		$("#code").css("top", "490px");
		$("#click4 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>")
	}
	$("#food2").css("display", "none");
	$("#food3").css("display", "none");
	$("#food1").css("display", "none");
	$("#food5").css("display", "none");
	$("#food6").css("display", "none");

});
$("#click5").click(function() {
	if($("#food5").css("display") == "block") {
		$("#food5").css("display", "none");
		$("#code").css("top", "370px");
		$("#click5 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>")
	} else {
		$("#food5").css("display", "block");
		$("#code").css("top", "445px");
		$("#click5 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>")
	}
	$("#food2").css("display", "none");
	$("#food3").css("display", "none");
	$("#food4").css("display", "none");
	$("#food1").css("display", "none");
	$("#food6").css("display", "none");

});
$("#click6").click(function() {
	if($("#food6").css("display") == "block") {
		$("#food6").css("display", "none");
		$("#code").css("top", "370px");
		$("#click6 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou.png'/>")
	} else {
		$("#food6").css("display", "block");
		$("#code").css("top", "395px");
		$("#click6 :nth-child(2)").html("<img src='../img/MenuAndNutritionPageImgs/jiantou2.png'/>")
	}
	$("#food2").css("display", "none");
	$("#food3").css("display", "none");
	$("#food4").css("display", "none");
	$("#food5").css("display", "none");
	$("#food1").css("display", "none");

});

//左侧展示图切换
$("#food1 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/意大利香辣.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food1 :nth-child(2)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/培根.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food1 :nth-child(3)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/火腿.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food1 :nth-child(4)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/新鲜蔬菜.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food2 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/意大利经典.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food2 :nth-child(2)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/意大利香肠.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food2 :nth-child(3)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/香烤鸡排.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food2 :nth-child(4)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/火鸡胸.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food2 :nth-child(5)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/日是照烧鸡.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food3 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/金枪鱼.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food3 :nth-child(2)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/香热骑士.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food3 :nth-child(3)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/香烤牛肉.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food3 :nth-child(4)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/骑士牛排.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food3 :nth-child(5)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/百味俱乐部.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food4 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/火腿.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food4 :nth-child(2)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/火鸡胸.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food4 :nth-child(3)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/香烤鸡排.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food4 :nth-child(4)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/香烤牛肉.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food4 :nth-child(5)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/百味俱乐部.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food5 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/三明治拼盘.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food5 :nth-child(2)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/甜饼拼盘.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food5 :nth-child(3)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/巨形三明治.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#food6 :nth-child(1)").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/营养与问答.png')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#baiweijuan").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/百味卷.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#baiweijuan").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/百味卷.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#salad").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/沙拉.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#drink").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/饮料小食.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#bf").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/早餐.jpg')",
		"backgroundRepeat": "no-repeat"
	});
});
$("#how").click(function() {
	$("#leftPic").css({
		"background": "url('../img/MenuAndNutritionPageImgs/howtoorder-1.jpg')",
		"backgroundRepeat": "no-repeat",
		"background-size": "100% 100%"
	});
});